home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / demos301.zip / DEMOSYS.REF < prev    next >
Text File  |  1993-01-15  |  63KB  |  1,600 lines

  1.  DEMOSYS.REF                   Last revised 01/15/93                     Page 1
  2.  
  3.                                 The DEMO System
  4.  
  5.                                  Wayne Software
  6.                                113 Sheffield St.
  7.                             Silver Spring, MD 20910
  8.  
  9.                                 Reference manual
  10.  
  11. --------------------------------------------------------------------------------
  12.  
  13.                                Table of contents
  14.  
  15. Table of contents ...............................................  1
  16. Command-line options:
  17.   DEMOMAKE.EXE ..................................................  3
  18.   The DEMO System viewer ........................................  3
  19. Control card references .........................................  4
  20.   Statement reference:
  21.     - filename [ description ] ..................................  5
  22.     - *ref [ description ] ......................................  5
  23.     - (GLOBAL) [ description ] ..................................  6
  24.     - (ONCE) [ description ] ....................................  6
  25.     - (SETn) [ description ] ....................................  6
  26.     - @label [ description ] ....................................  7
  27.     /.,  ./ .....................................................  7
  28.     + filename ..................................................  7
  29.     Comments ....................................................  7
  30.     DATADIR [ subdirectory ] ....................................  8
  31.     DO name [ parms ]
  32.     DO (DUMMY) [ parms ] ........................................  8
  33.     MACRO name [ REUSE | SKIP ], MEND ...........................  8
  34.   SET statements:
  35.     SET CASE ON, SET CASE OFF ...................................  9
  36.     SET CLS ON, SET CLS OFF .....................................  9
  37.     SET COLOR settings .......................................... 10
  38.     SET CURSOR string ........................................... 10
  39.     SET KEYS CLEAR .............................................. 11
  40.     SET KEYS SETn ............................................... 11
  41.     SET LOGO string ............................................. 11
  42.     SET MONO settings ........................................... 11
  43.     SET SETTINGS SETn ........................................... 12
  44.     SET TOP screen .............................................. 12
  45.  DEMOSYS.REF                   Last revised 01/15/93                     Page 2
  46.  
  47.   Action commands:
  48.     ASSIGN ^Evar^ string ........................................ 13
  49.     BEEP ........................................................ 13
  50.     BUFFER [ chars ] ............................................ 14
  51.     CALL screen [ KEYn | parms ] ................................ 13
  52.     CD directory ................................................ 14
  53.     CDD drive:directory ......................................... 14
  54.     CLS ......................................................... 15
  55.     COPY file1 file2 ............................................ 15
  56.     DATA ........................................................ 15
  57.     DELETE filename ............................................. 15
  58.     DISPLAY COLOR, DISPLAY MONO, DISPLAY TOGGLE ................. 15
  59.     DRIVE letter ................................................ 15
  60.     ECHO [ string[@] ] .......................................... 16
  61.     ECHOA [ string[@] ] ......................................... 16
  62.     FIELD [ TOP | FIRST | -999 to 999 | BOTTOM | LAST ] ......... 16
  63.     GOTO scren [ KEYn | CLEAR | parms ] ......................... 17
  64.     KEYPRESS .................................................... 17
  65.     LOADLOGO ^Evar^ char_count .................................. 18
  66.     LOADLOGO CLEAR .............................................. 19
  67.     LOCATE row col .............................................. 19
  68.     MD directory ................................................ 20
  69.     NONE ........................................................ 20
  70.     PAUSE [ seconds ] ........................................... 21
  71.     PAUSEA [ seconds ] .......................................... 21
  72.     PAUSE BREAK ON, PAUSE BREAK OFF ............................. 21
  73.     PAUSE DEMO seconds .......................................... 21
  74.     PLAY string ................................................. 22
  75.     PLAY ON, PLAY OFF ........................................... 22
  76.     POP [ TOP | 1 to 20 | KEYn ] ................................ 23
  77.     PROMPT ^Evar^ pattern string ................................ 24
  78.     PROMPTA ^Evar^ pattern string ............................... 25
  79.     QUIT [ return_code ] ........................................ 26
  80.     RD directory ................................................ 27
  81.     REDRAW ...................................................... 27
  82.     RUN [ string ] .............................................. 28
  83.     RUNA [ string ] ............................................. 29
  84.     SAVE filename ............................................... 29
  85.     SCREEN [ TOP | FIRST | -999 to 999 | BOTTOM | LAST ] ........ 30
  86.     WRITE filename string ....................................... 31
  87.  
  88.   KEY statement ................................................. 32
  89.   Miscellaneous string concepts ................................. 33
  90.     Environental variables (^Evar^) ............................. 34
  91.     ^ control codes ............................................. 35
  92.     Primary vs alternate screens ................................ 36
  93.   System maximums ............................................... 36
  94.  
  95.  DEMOSYS.REF                   Last revised 01/15/93                     Page 3
  96.  
  97. --------------------------------------------------------------------------------
  98.  
  99.                               Command-line options
  100.  
  101. DEMOMAKE.EXE syntax:
  102.  
  103.         DEMOMAKE ctlname exename [ /OVERWRITE ] [ /SCAN ] [ /Xstring ]
  104.           [ /Q ] [ /? ]
  105.  
  106. where:
  107.  
  108. "ctlname" is the name of the main control file that you want to process.  The
  109. main control file can include links to other control files if desired Drive and
  110. path information can be provided if desired.
  111.  
  112. "exename" is the name of the self-viewing file you want to create.  The default
  113. extension is "EXE".  Typically, the base name will be the same as the ctlname.
  114. Drive and path information can be provided if desired.
  115.  
  116. "/OVERWRITE" says to overwrite the exename file if any is found.  Otherwise, if
  117. found, you'll be prompted as to whether you want to overwrite it.
  118.  
  119. "/SCAN" is used to have the program review your control files without actually
  120. checking on any of the screen files (either imbedded or external).  This does
  121. not produce an EXE file but it's a useful way of quickly reviewing the validity
  122. of your file.
  123.  
  124. "/Xstring" is used to protect your control file from being regenerated by the
  125. DEMOSAVE program (available to registered users only).  The same string has to
  126. be provided when DEMOSAVE is run.
  127.  
  128. "/Q" says to not play any of the PLAY commands within the file.  Normally, they
  129. are all played during compilation in order to make sure they are valid.  In
  130. case you forget, you can also press the letter "Q" during compilation to turn
  131. it off.
  132.  
  133. "/?" or "/HELP" or "HELP" gives you syntactical information about how to use the
  134. command.
  135.  
  136.  
  137. The DEMO System viewer syntax:
  138.  
  139.         exename [ /M ] [ /Q ] [ /? ]
  140.  
  141. where:
  142.  
  143. "exename" is the name of the self-viewing file created by DEMOMAKE.EXE.
  144.  
  145. "/M" says to use the monochrome (or alternate) color set.  The DEMO System
  146. defaults to the color set.
  147.  
  148. "/Q" says to skip all BEEP and PLAY statements.
  149.  
  150. "/?" or "/HELP" or "HELP" gives you syntactical information about how to use the
  151. command.
  152.  
  153.  DEMOSYS.REF                   Last revised 01/15/93                     Page 4
  154.  
  155. --------------------------------------------------------------------------------
  156.  
  157.                              Control Card Reference
  158.  
  159. Descriptions below are separated into five sections:
  160.  
  161.   Statement Reference:  Commands which are not limited to screen pages.
  162.     These include Macros, page references, and some other commands.
  163.  
  164.   SET statements:  Commands which are defined once for every screen page.
  165.  
  166.   Action commands:  Commands which can appear on their own in some types
  167.     of screen pages or else in KEY commands.
  168.  
  169.   KEY statements:  Commands which are activated by the user pressing a
  170.     given key on the keyboard.
  171.  
  172.   Miscellaneous string ideas:  Things like ^ codes and environmental variables.
  173.  
  174.  
  175. Note that within The DEMO System viewer, actions happen in a predictable order.
  176. This order is as follows:
  177.    (1)  All SET statements are executed.  The SET LOGO statement is not acted
  178.         upon until later.  If SET CLS ON is active, the screen is cleared.
  179.    (2)  The text screen (if any) is displayed.
  180.    (3)  The SET LOGO statement (if any) is activated; writing over any text that
  181.         is already on the screen.
  182.    (4)  Any action commands are activated.
  183.    (5)  Any KEY commands are activated.
  184.  
  185.  DEMOSYS.REF                   Last revised 01/15/93                     Page 5
  186.  
  187. --------------------------------------------------------------------------------
  188.  
  189.                               Statement Reference
  190.  
  191. - filename [ description ]
  192.  
  193. Defines a page whose display screen is stored in an external file.  The filename
  194. can include drive and path information if desired.  Otherwise, the file will be
  195. looked for in your default subdirectory unless a DATADIR statement appears.
  196.  
  197. Note that even if drive/path information is coded, the related CALL or GOTO
  198. statement should not include this drive/path information.
  199.  
  200. All filenames (minus drive/path information) must be unique.
  201.  
  202. These pages can include: SET statements
  203.                          Action commands
  204.                          KEY statements
  205.  
  206. *******************
  207.  
  208. - *ref [ description ]
  209.  
  210. Defines a page whose display screen is imbedded within /. ... ./ lines.
  211. Example:
  212.  
  213.         - *001 Testing
  214.         SET KEY (ESC) POP
  215.         /.
  216.                 Sample screen
  217.                    ^C2 Hi! ^C0
  218.         ./
  219.  
  220. The DEMOMAKE program actually requires that all display screens to be stored as
  221. external files.  As a result, when it encounters imbedded screens, it
  222. transparently writes them out to your default drive and subdirectory under the
  223. names ~DEMOINT.nnn (where "nnn" is a three-digit number assigned sequentially).
  224. These files are then read back in during the second pass and then deleted.  Due
  225. to this, imbedded files have to be processed twice and will be slower to compile
  226. than non-imbedded files.
  227.  
  228. Because of this rewriting, the use of the ^EFNAME^ environmental variable with
  229. an imbedded screen will show the file name to be ~DEMOINT.nnn, not the label
  230. you assigned it.
  231.  
  232. All references must be unique.
  233.  
  234. These pages can include: SET statements
  235.                          Action commands
  236.                          KEY statements
  237.  
  238.  DEMOSYS.REF                   Last revised 01/15/93                     Page 6
  239.  
  240. *******************
  241.  
  242. - (GLOBAL) [ description ]
  243.  
  244. Allows you to establish default KEY and SET settings.  Any KEY or SET statements
  245. that appear before you first screen page are presumed to be within (GLOBAL).
  246. The (GLOBAL) statement automatically resets all previously-defined (GLOBAL) KEY
  247. settings but does not affect any (GLOBAL) SET settings.
  248.  
  249. The (GLOBAL) statement affects all regular page references which follow it.
  250.  
  251. You cannot include any action commands within a (GLOBAL) definition.
  252.  
  253. These pages can include: SET statements
  254.                          KEY statements
  255.  
  256. *******************
  257.  
  258. - (ONCE) [ description ]
  259.  
  260. Establishes a set of commands that is only executed once, at the start of the
  261. program.  Typically, the use of this is confined to LOADLOGO and associated DATA
  262. statements.  For menuing systems, you may find it desirable to put a DELETE
  263. statement in this section.
  264.  
  265. Note that the (ONCE) page counts as a page and can be used (usually
  266. accidentally) as a destination for SCREEN, CALL, and GOTO commands.
  267.  
  268. These pages can include: Action commands
  269.  
  270. *******************
  271.  
  272. - (SETn) [ description ]
  273.  
  274. Allows you to establish up to 10 sets of KEY and SET defaults.  "n" has to be a
  275. digit from "0" to "9".
  276.  
  277. The (SETn) KEY settings are invoked by using the "SET KEY SETn" command.  The
  278. (SETn) SET settings are invoked by using the "SET SETTINGS SETn" command.
  279.  
  280. You have to define the (SETn) before you use it.  You can re-specify the (SETn)
  281. settings if you want.  You can define (SETn) sections in any order; you don't
  282. have to define (SET0) before you define (SET1).
  283.  
  284. Action commands appearing within a (SETn) definition are ignored (unlike in
  285. (GLOBAL) definitions where they generate errors).
  286.  
  287. These pages can include: SET statements
  288.                          KEY statements
  289.  
  290.  DEMOSYS.REF                   Last revised 01/15/93                     Page 7
  291.  
  292. *******************
  293.  
  294. - @label [ description ]
  295.  
  296. Establishes a page with no associated screen file.  Is typically used for
  297. prompt or action-only screens, setting up buffers, etc.
  298.  
  299. Labels are truncated at 12 characters including the "@" character.
  300.  
  301. These pages can include: SET statements
  302.                          Action commands
  303.  
  304. *******************
  305.  
  306. /.
  307. ...
  308. ./
  309.  
  310. Defines the screen text for any page with imbedded screen text.  The "./"
  311. statement must appear by itself on the control line; comments are not allowed.
  312.  
  313. *******************
  314.  
  315. + filename
  316.  
  317. Says to pick up more control statements from another file.  Can include drive
  318. and path information if desired.
  319.  
  320. *******************
  321.  
  322. Comments
  323.  
  324. The DEMO System ignores any blank lines as well as any lines that begin with the
  325. following characters:
  326.  
  327.         : (colon)
  328.         ; (semi-colon)
  329.         ' (single quote)
  330.  
  331. Comments can also be included on lines after regular commands; precede the
  332. comment with "/*" as in:
  333.  
  334.         SET KEY (ESC) GOTO SCRN.001   /* Takes the user to the main menu
  335.  
  336. The use of comments is always recommended.
  337.  
  338.  DEMOSYS.REF                   Last revised 01/15/93                     Page 8
  339.  
  340. *******************
  341.  
  342. DATADIR [ subdirectory ]
  343.  
  344. Specifies the subdirectory location of all file references that follow.  This
  345. statement can appear anywhere including within page screen definitions (but not
  346. within the text of the screen).  The DATADIR setting remains in effect until
  347. another DATADIR setting is encountered.
  348.  
  349. If subdirectory is not provided, files will be looked for in your default
  350. subdirectory.
  351.  
  352. You can always hard-code the paths in all of your file references but it's
  353. easier to use the DATADIR command.
  354.  
  355. *******************
  356.  
  357. DO name [ parms ]
  358. DO (DUMMY) [ parms ]
  359.  
  360. Executes a previously-defined Macro statement.
  361.  
  362. Up to 9 words can be passed in and these will be substituted in for any
  363. references to &1 to &9 during compilation.  (If 10 or more words are provided,
  364. the extra words are all stuck in &0.) These variables remain set until another
  365. DO statement is encountered.
  366.  
  367. DO (DUMMY) is used to clear or reset Macro variables.  No action other than the
  368. variable clearing goes on with this Macro statement.  You can, therefore, have
  369. &1 to &9 (and &0) defined even without having any associated MACRO statement.
  370.  
  371. *******************
  372.  
  373. MACRO name [ REUSE | SKIP ]
  374. ...
  375. MEND
  376.  
  377. Defines a Macro.  This code can include any statement other than another Macro
  378. definition.  The Macro block must end with a MEND statement, which must appear
  379. by itself on a control line.  (The MEND statement can include comments though.)
  380.  
  381. Macro names must be unique unless "REUSE" or "SKIP" is specified.  If the
  382. definition already exists and "REUSE" is specified, the new definition will
  383. replace the old.  If the definition already exists and "SKIP" is specified, the
  384. new definition will be ignored (although it does show up in the count of
  385. macros).
  386.  
  387. The Macro is actually invoked with a DO command.
  388.  
  389.  DEMOSYS.REF                   Last revised 01/15/93                     Page 9
  390.  
  391. --------------------------------------------------------------------------------
  392.  
  393.                                  SET Statements
  394.  
  395. Each SET statement is defined once per display screen.  (One exception:  SET
  396. KEYS SETn and SET SETTINGS SETn can occur multiple times.)  If the same SET
  397. statement appears more than once in a given page, the latter definition always
  398. wins.  Keep this in mind; you can't have the program be case-sensitive for some
  399. keys and case-insensitive for others on the same screen.
  400.  
  401. *******************
  402.  
  403. SET CASE ON
  404. SET CASE OFF
  405.  
  406. Determines whether the case of the user's input matters when processing a KEY
  407. statement.  If SET CASE ON is in effect, "g" will be treated differently than
  408. "G".
  409.  
  410. The default setting is SET CASE OFF.
  411.  
  412. *******************
  413.  
  414. SET CLS ON
  415. SET CLS OFF
  416.  
  417. Determines whether the screen is automatically cleared when a new text screen
  418. (confined to "- filename" and "- *ref" statements) is loaded.
  419.  
  420. The default setting is SET CLS ON.
  421.  
  422. DEMOSYS.REF                   Last revised 01/15/93                     Page 10
  423.  
  424. *******************
  425.  
  426. SET COLOR settings
  427.  
  428. Allows you to define up to 8 color "sets" (numbered ^C0 to ^C7) which you can
  429. use in most displayed text.  Each color set consists of 1 to 8 three-digit
  430. numbers.  The first three-digit number defines ^C0, the eighth defines ^C7.
  431.  
  432. Each three digit number consists of two digits for a foreground color and one
  433. digit for the background color.  The foreground color must be zero-filled if
  434. it's only one digit in length (use "07" instead of "7").
  435.  
  436. Foreground colors:
  437.  
  438.         Low intensity           High intensity
  439.  
  440.         0 = black                8 = dark grey
  441.         1 = blue                 9 = light blue
  442.         2 = green               10 = light green
  443.         3 = cyan                11 = light cyan
  444.         4 = red                 12 = light red
  445.         5 = magenta             13 = light magenta
  446.         6 = brown               14 = light yellow
  447.         7 = white               15 = bright white
  448.  
  449. Adding 16 to any color will make the text blink.
  450.  
  451. Background colors can consist of 0 to 7 above.
  452.  
  453. Bright white on blue, for example, would be "151".
  454.  
  455. The default setting is SET COLOR 151 154 152 117 097 153 001 157
  456.  
  457. All screen text lines are defined to use color set 0.  You can imbed color
  458. control codes anywhere in your text to get around this.  The SET COLOR settings
  459. automatically come up by default unless /M is passed into the viewer.  You can
  460. switch to the monochrome settings within your program by issuing the command
  461. "DISPLAY MONO" or "DISPLAY TOGGLE".
  462.  
  463. Other than the text screen lines, most text usings the color of the last
  464. string printed as the default color.
  465.  
  466. *******************
  467.  
  468. SET CURSOR string
  469.  
  470. This establishes the shape and color of the screen's cursor.  This is typically
  471. applicable only for full-screen operations.
  472.  
  473. The cursor definition string can include ^ controls.  For example:
  474.  
  475.         SET CURSOR ^C2(^T10^
  476.  
  477. The default setting is SET CURSOR _
  478.  
  479. DEMOSYS.REF                   Last revised 01/15/93                     Page 11
  480.  
  481. *******************
  482.  
  483. SET KEYS CLEAR
  484.  
  485. Clears any key definitions inherited from the (GLOBAL) level.
  486.  
  487. *******************
  488.  
  489. SET KEYS SETn
  490.  
  491. Grabs all KEY settings in (SETn) and uses them for this screen.  (SETn) has to
  492. be previously defined.
  493.  
  494. The settings are added in place, leaving KEY statements before and after as they
  495. were.  If the (SETn) KEY setting is already defined before the SET KEYS SETn
  496. statement is encountered, the first definition wins.  Similarly, KEY statements
  497. which appear after a SET KEYS SETn statement lose precedence over the
  498. definitions in SET KEYS SETn.
  499.  
  500. The SET SETTINGS SETn command grabs all SET settings in (SETn).
  501.  
  502. *******************
  503.  
  504. SET LOGO string
  505.  
  506. Establishes a logo or byline that appears somewhere on the screen.  This is
  507. typically used to identify the fact that the person is running a demo, not the
  508. real product.  The logo prints over any text that is already on the screen.
  509.  
  510. The logo string can include ^ controls.  This allows you to have the logo
  511. appearing on multiple logo lines on your screen although only one SET LOGO is
  512. accepted.  For example:
  513.  
  514.         SET LOGO ^C1^P1,35This is a logo^P25,30appearing on top and bottom
  515.  
  516. *******************
  517.  
  518. SET MONO settings
  519.  
  520. Defines the monochrome (or alternate) screen colors.  See the description of
  521. colors in the SET COLOR command description.
  522.  
  523. In actuality, COLOR and MONO just refers to a primary and secondary set of
  524. screen colors.  You could define MONO to be color as well.
  525.  
  526. The default setting is SET MONO  150 070 007 157 150 070 007 157
  527.  
  528. DEMOSYS.REF                   Last revised 01/15/93                     Page 12
  529.  
  530. *******************
  531.  
  532. SET SETTINGS SETn
  533.  
  534. Grabs all SET settings in (SETn) and uses them for this screen.  (SETn) has to
  535. be previously defined.
  536.  
  537. The settings are added in place, leaving SET statements before and after as they
  538. were.  If the (SETn) SET setting is already defined before the SET SETTINGS SETn
  539. statement is encountered, the first definition wins.  Similarly, SET statements
  540. which appear after a SET SETTINGS SETn statement lose precedence over the
  541. definitions in SET SETTINGS SETn.
  542.  
  543. The SET KEYS SETn command grabs all KEY settings in (SETn).
  544.  
  545. *******************
  546.  
  547. SET TOP screen
  548.  
  549. Determines which screen the system will bring up if a "POP TOP" statement is
  550. executed.  Is also the screen that's brought up if a POP statement tries to POP
  551. further back than the CALL stack provides.
  552.  
  553. Defaults to the first real text screen in your control file.
  554.  
  555. DEMOSYS.REF                   Last revised 01/15/93                     Page 13
  556.  
  557. --------------------------------------------------------------------------------
  558.  
  559.                                 Action commands
  560.  
  561. ASSIGN ^Evar^ [ string ]
  562.  
  563. Assigns a value to a DOS environmental variable or to any of the user-defined
  564. variables in The DEMO System.  For DOS environmental variables, care should be
  565. taken that you don't expand the variable too much and cause the environment area
  566. to explode.
  567.  
  568. Note that redefining DOS environmental variables only works until you quit to
  569. DOS, at which time they return to their original settings.
  570.  
  571. The assignment string can include environmental variables.
  572.  
  573. If the assignment string is left off, the value of ^Evar^ will be null.
  574.  
  575. *******************
  576.  
  577. BEEP
  578.  
  579. Beeps.  You can be more creative using PLAY commands though.  BEEP is useful if
  580. you want to alert people to invalid keystrokes:
  581.  
  582.         KEY (ELSE) BEEP
  583.  
  584. *******************
  585.  
  586. BUFFER [ chars ]
  587.  
  588. Buffers one or more characters.  These characters are then read in when The DEMO
  589. System encounters any keypress situation.
  590.  
  591. Leaving off the parameter results in the buffer being immediately cleared.
  592.  
  593. One of the characters can be (LASTKEY) which is the value of the last key
  594. pressed.  Passing this then clears the value of (LASTKEY).  This is typically
  595. used for screens that you want any keypress to advance to the next screen but
  596. you still want to use the keypress for some later movement.
  597.  
  598. Buffering is affected by these commands:
  599.         PAUSE BREAK ON
  600.         PAUSE BREAK OFF
  601.         PAUSE DELAY seconds
  602.  
  603. DEMOSYS.REF                   Last revised 01/15/93                     Page 14
  604.  
  605. *******************
  606.  
  607. CALL screen [ KEYn | parms ]
  608.  
  609. Passes control to another screen (or label) with the intention of having a POP
  610. command later on returning control to the current screen.
  611.  
  612. The KEYn parameter says to position the cursor at input key "n" when the next
  613. screen in loaded.
  614.  
  615. The optional parameters allow you to pass up to 9 values into the next screen.
  616. These values are stored in environmental variables ^E1^ to ^E9^.  These keys
  617. remain set until the next CALL or GOTO statement is encountered which also
  618. passes parameters.
  619.  
  620. The parms can include ^ control items and environmental variables.
  621.  
  622. *******************
  623.  
  624. CD directory
  625.  
  626. Changes the default subdirectory.  If that directory does not exist, an error
  627. message will be displayed but the program will continue on.
  628.  
  629. If the subdirectory includes drive information, the default subdirectory on
  630. *that* drive, not the default drive, will be changed.
  631.  
  632. The directory can be an environmental variable.
  633.  
  634. See also the CDD, DRIVE, MD, and RD commands.
  635.  
  636. *******************
  637.  
  638. CDD drive:directory
  639.  
  640. Changes the default drive and subdirectory.  (Essentially the same thing as
  641. issue a DRIVE command, followed by a CD command.) If that directory does not
  642. exist, an error message will be displayed but the program will continue on.
  643.  
  644. The drive:directory can be an environmental variable.
  645.  
  646. See also the CD, DRIVE, MD, and RD commands.
  647.  
  648. DEMOSYS.REF                   Last revised 01/15/93                     Page 15
  649.  
  650. *******************
  651.  
  652. CLS
  653.  
  654. Clears the primary screen.
  655.  
  656. *******************
  657.  
  658. COPY file1 file2
  659.  
  660. Copies one file (file1) under another file (file2).  The destination file is
  661. replaced if it exists already.  Either filename can include drive and path
  662. information.
  663.  
  664. Either file can be an environmental variable.
  665.  
  666. *******************
  667.  
  668. DATA ...
  669.  
  670. Statement which, so far, is only used with the LOADLOGO command.
  671.  
  672. *******************
  673.  
  674. DELETE filename
  675.  
  676. Deletes a file.  The filename can include drive and path information.
  677.  
  678. The file name can be an environmental variable.
  679.  
  680. *******************
  681.  
  682. DISPLAY COLOR
  683. DISPLAY MONO
  684. DISPLAY TOGGLE
  685.  
  686. Sets the default color setting to either the SET COLOR set or the SET MONO (or
  687. alternate) set.  DISPLAY TOGGLE toggles between the two (COLOR becomes MONO and
  688. vice versa).  This is frequently used in a key definition:
  689.  
  690.         KEY (A-M) DISPLAY MONO
  691.         KEY (A-C) DISPLAY COLOR
  692.  
  693. Note that the color changes do not take effect until the screen is redraw.  You
  694. may want to handle display toggling in a label since that will redraw the
  695. screen automatically when done.
  696.  
  697. *******************
  698.  
  699. DRIVE letter
  700.  
  701. Sets the default drive as "letter".  The drive designation *cannot* be an
  702. environmental variable.
  703.  
  704. See also the CD, CDD, MD, and RD commands.
  705.  
  706. DEMOSYS.REF                   Last revised 01/15/93                     Page 16
  707.  
  708. *******************
  709.  
  710. ECHO [ string[@] ]
  711.  
  712. Prints a string to the primary screen.  The string can include environmental
  713. variables and control codes.
  714.  
  715. If a "@" immediately follows the string, The DEMO System will not do a carriage
  716. return/line feed after the string.
  717.  
  718. Note that it's possible to cause a system failure by specifying a string that
  719. will not fit within the designated line.  Exercise some judgment when putting
  720. long strings on the right side of the screen.
  721.  
  722. *******************
  723.  
  724. ECHOA [ string[@] ]
  725.  
  726. Prints a string to the alternate screen.  See the ECHO action command for
  727. further details.
  728.  
  729. *******************
  730.  
  731. FIELD [ TOP | FIRST | -999 to 999 | BOTTOM | LAST ]
  732.  
  733. Moves the cursor to a different input field on the current screen.  Except for
  734. TOP (or FIRST) and BOTTOM (or LAST), the new field position cannot be expressed
  735. in absolute terms.  Instead, you specify the relative position to move the
  736. cursor.
  737.  
  738. This command is typically used when designing full-screen systems.  For example:
  739.  
  740.         SET KEY (RIGHT) FIELD 1
  741.         SET KEY (LEFT) FIELD -1
  742.         SET KEY (HOME) FIELD TOP
  743.         SET KEY (END) FIELD BOTTOM
  744.  
  745. The command is ignored if you have less than two input fields on a given screen.
  746.  
  747. DEMOSYS.REF                   Last revised 01/15/93                     Page 17
  748.  
  749. *******************
  750.  
  751. GOTO screen [ KEYn | CLEAR | parms ]
  752.  
  753. Passes control to another screen (or label) with the intention of *not*
  754. returning control to the current screen.
  755.  
  756. The KEYn parameter says to position the cursor at input key "n" when the next
  757. screen in loaded.
  758.  
  759. The CLEAR parameter says to clear the CALL return stack when the jump is made.
  760.  
  761. The optional parameters allow you to pass up to 9 values into the next screen.
  762. These values are stored in environmental variables ^E1^ to ^E9^.  These keys
  763. remain set until the next CALL or GOTO statement is encountered which also
  764. passes parameters.
  765.  
  766. Note that a GOTO statement on its own (outside a KEY statement) will result in
  767. the current screen being closed and must be followed by a new page declaration
  768. or else the end of the file.
  769.  
  770. The parms can include ^ control items and environmental variables.
  771.  
  772. *******************
  773.  
  774. KEYPRESS
  775.  
  776. Pauses and waits for a user input.  KEYPRESS is automatically executed for a
  777. screen with an associated text page.
  778.  
  779. Note that a KEYPRESS statement on its own (outside a KEY statement) will result
  780. in the current screen being closed and must be followed by a new page
  781. declaration or else the end of the file.
  782.  
  783. Example:
  784.         - @TESTING
  785.         KEY (UP) ECHO Pressed UP
  786.         KEY (DOWN) ECHO Pressed DOWN
  787.         KEY (ESC) QUIT
  788.         ECHO Press either UP or DOWN or ESC
  789.         KEYPRESS
  790.  
  791. (Remember that action commands are always executed before KEY statements so the
  792. ECHO will show up, then the KEYPRESS will be acted upon, and the result will
  793. be used by the KEY statements.)
  794.  
  795. DEMOSYS.REF                   Last revised 01/15/93                     Page 18
  796.  
  797. *******************
  798.  
  799. LOADLOGO ^Evar^ char_count
  800. DATA ...
  801. DATA ...
  802.  
  803. A technique for loading graphics characters over the VGA character set so you
  804. can make things like logos or special boxes while within the text environment.
  805. The technique itself has been explained in several technical articles and
  806. involves the use of interrupts and such.  It will not be explained here other
  807. than the explain the format used within this program.
  808.  
  809. The ^Evar^ parameter is the variable that will be assigned the characters that
  810. constitute the redefined characters.  If you want to define several logos, each
  811. of which can consist of one or more characters together, you would need to use
  812. several LOADLOGO statements.  Once the logo has been loaded, you can use the
  813. ^Evar^ in ECHO, SET LOGO, etc statements.
  814.  
  815. The char_count indicates how many characters put together constitute this logo.
  816. There has to be one DATA line for every character.
  817.  
  818. The DATA statements consist of 17 values.  The first value is the ASCII value
  819. that the character will replace (e.g. 211 for CHR$(211)).  The next values are
  820. the decimal representation for each line of pixels.  VGA fonts are 16 pixels
  821. high so there are 16 values after the decimal representation.
  822.  
  823. The DATA statements must immediately follow the LOADLOAD statement.  Blank
  824. lines and comments are not allowed.
  825.  
  826. The following example defines a bat silhouette as ASCII characters 221, 222, and
  827. 224.
  828.  
  829.         LOADLOGO ^EBATSYMBOL^ 3
  830.         DATA 221,0,24,28,60,62,63,127,127,127,255,255,255,239,206,132,128
  831.         DATA 222,66,126,126,126,126,255,255,255,255,255,255,255,255,126,60,24
  832.         DATA 224,0,24,56,60,124,252,254,254,254,255,255,255,247,115,33,1
  833.  
  834. LOADLOGO is ignored if the user does not have a VGA card.  In that case, the
  835. environmental variable will be set to null.
  836.  
  837. You typically will not want to define the logo multiple times in one program.
  838. Doing so causes the screen to flicker.  It's usually best to use the (ONCE)
  839. screen definition to load the logo when The DEMO System viewer is loaded and
  840. then not do it again.
  841.  
  842. Some applications (like PC Tools and the Norton Utilities) may redefine the
  843. character set on their own.  In this case, the environmental variable will still
  844. be set but it will display weird characters instead of what you want.  Notice
  845. which programs do this and isolate the RUN commands that are affected.  If you
  846. have a command like SET LOGO which uses the logo, you will want to either
  847. re-load the logo again (using the LOADLOGO command) or redefine the
  848. environmental variable to be null.
  849.  
  850. DEMOSYS.REF                   Last revised 01/15/93                     Page 19
  851.  
  852. *******************
  853.  
  854. LOADLOGO CLEAR
  855.  
  856. This command clears any VGA character redefinitions that you've made.  This
  857. insures that the user's DOS session won't have weird little graphics characters
  858. showing up at odd times.
  859.  
  860. If the characters actually remain on the screen after LOADLOGO CLEAR is issued,
  861. you will probably want to issue a CLS command to clear the screen.
  862.  
  863. LOADLOGO CLEAR does not affect the contents of the environmental variable you
  864. defined in the LOADLOGO command.  If you print that string after using LOADLOGO
  865. CLEAR, that string will show up as the original DOS characters, not the
  866. redefined ones.  You may want to assign it to null if you want to continue on.
  867.  
  868. The LOADLOGO CLEAR statement is ignored if the user does not have a VGA card or
  869. if they didn't set any symbols in the first place.
  870.  
  871. *******************
  872.  
  873. LOCATE row col
  874.  
  875. Positions the cursor at a given row and column on the screen.  Positioning on
  876. the screen starts with the upper left corner being 1, 1 and the lower right
  877. corner being 25, 80.
  878.  
  879. Do not use commas between the positions.
  880.  
  881. You can use the ^Prow,col control codes to position most text instead of using
  882. the LOCATE command.
  883.  
  884. DEMOSYS.REF                   Last revised 01/15/93                     Page 20
  885.  
  886. *******************
  887.  
  888. MD directory
  889.  
  890. Makes a new subdirectory.  If that subdirectory cannot be created, an error
  891. message will be displayed but the program will continue on.
  892.  
  893. The directory can be an environmental variable and it can include drive
  894. information if desired.
  895.  
  896. See also the CD, CDD, DRIVE, and RD commands.
  897.  
  898. *******************
  899.  
  900. NONE
  901.  
  902. This is a special null-operation command which is typically only used in
  903. KEY statements.  The purpose is to nullify a key assignment made by a (SETn) or
  904. GLOBAL statement.
  905.  
  906. For (SETn) statements, the NONE assignment has to be made *before* the SET VARS
  907. SETn statement.
  908.  
  909. Example:
  910.  
  911.         - (GLOBAL)
  912.         KEY (UP) FIELD -5
  913.         KEY (DOWN) FIELD 5
  914.         ... (a half-dozen key assignments you like) ...
  915.         - (SET1)
  916.         KEY (LEFT) FIELD -1
  917.         KEY (RIGHT) FIELD 1
  918.         ... (a dozen key assignments you like) ...
  919.         - *001 Testing
  920.         KEY (UP) NONE      /* Note that these keys will do nothing now
  921.         KEY (DOWN) NONE
  922.         SET KEYS SET1
  923.  
  924. DEMOSYS.REF                   Last revised 01/15/93                     Page 21
  925.  
  926. *******************
  927.  
  928. PAUSE [ seconds ]
  929.  
  930. Waits for either the specified number of seconds or until the user presses any
  931. key.  Seconds can be expressed in tenths and must be between 0.1 and 600.
  932.  
  933. The activity is done on the primary screen.
  934.  
  935. *******************
  936.  
  937. PAUSEA [ seconds ]
  938.  
  939. Same as "PAUSE [ seconds ]" but activity is done on the alternate screen.
  940.  
  941. *******************
  942.  
  943. PAUSE BREAK ON
  944. PAUSE BREAK OFF
  945.  
  946. Determines whether someone can escape (using the Esc key) out of a self-running
  947. demo.
  948.  
  949. Defaults to PAUSE BREAK ON (the user can escape out).
  950.  
  951. *******************
  952.  
  953. PAUSE DEMO seconds
  954.  
  955. Determines how many seconds the system should delay between buffered keystrokes
  956. in a self-running demo.  The user can skip through the pause by pressing any
  957. keyboard key (not mouse key).
  958.  
  959. Seconds can be expressed in tenths and must be between 0.1 and 600.
  960.  
  961. Defaults to PAUSE DEMO 1.
  962.  
  963. DEMOSYS.REF                   Last revised 01/15/93                     Page 22
  964.  
  965. *******************
  966.  
  967. PLAY string
  968.  
  969. The PLAY command plays a string of sounds using QuickBASIC's PLAY command.
  970. There are lots of characters that can appear in the PLAY string.  The following
  971. chart summarizes them but you should use a BASIC manual for fuller explanations
  972. if necessary:
  973.  
  974.         A to G          Plays note in range A to G: "#" after note implies
  975.                         a sharp while "-" afterward implies a flat
  976.         L n             Sets the default length of each note (from 1 [whole
  977.                         note] to 64 [very short note]).  You can also specify
  978.                         the length after each note itself, e.g. "A16".
  979.         MN              Music normal.  Each note plays for 7/8's its time.
  980.         ML              Music legato.  Each note plays for full period.
  981.         MS              Music staccato.  Each note plays 3/4 of its time.
  982.         P n             Specifies a pause of length 1 to 64.
  983.         T n             Specifies tempo (number of L 4 quarter notes played
  984.                         in one minute).  Range can be 32 to 255, default 120.
  985.         MF              Music foreground.  The program waits until the notes
  986.                         finish before going on.
  987.         MB              Music background.  The notes start playing and the
  988.                         user can continue to press keys while the music plays.
  989.                         MB is the default in The DEMO System.
  990.         .               A period after the note causes the note to play
  991.                         3/2's of it's time.
  992.         # or +          These characters after the note cause it to be sharped.
  993.         -               A minus after the note causes it to be flatted.
  994.  
  995. The first few notes of Beethoven's Fifth Symphony is the following:
  996.  
  997.         PLAY mb t180 o2 p2 p8 l8 ggg l2 e- p24 p8 l8 fff l2 d
  998.  
  999. PLAY strings are played during compilation in order to check them for errors.
  1000. You can turn off this verification by using DEMOMAKE's /Q option or else by
  1001. pressing Q during compilation.  Note that failure to verify the PLAY strings at
  1002. some point may result in non-recoverable execution errors.
  1003.  
  1004. *******************
  1005.  
  1006. PLAY ON
  1007. PLAY OFF
  1008.  
  1009. The PLAY OFF command turns off any BEEP and PLAY commands within your
  1010. demonstration.  The PLAY ON command turns them back on.
  1011.  
  1012. PLAY ON is the default.
  1013.  
  1014. DEMOSYS.REF                   Last revised 01/15/93                     Page 23
  1015.  
  1016. *******************
  1017.  
  1018. POP [ TOP | 1 to 20 | KEYn ]
  1019.  
  1020. Returns to the statement after a prior CALL statement.  Relative to GOTO
  1021. statements, POP commands make screen levels easier to keep track of and allows
  1022. you to designate some screens or sets of screens as being common to several
  1023. demonstrations.
  1024.  
  1025. You can instruct POP to return you to any of the last 20 screens that you made
  1026. CALL's from.  You can also instruct it to return to the screen defined as your
  1027. "top" screen (see SET TOP), whether that screen had used a CALL or not.
  1028.  
  1029. If you want to return to the prior CALL, you can specify which keyboard input
  1030. item the cursor should rest on.  Otherwise, the program will automatically
  1031. select the first item on the screen.  For example:
  1032.  
  1033.         - *001 Central menu
  1034.         KEY (LEFT) FIELD -1
  1035.         KEY (RIGHT) FIELD 1
  1036.         KEY @1 CALL @002
  1037.         KEY @2 CALL @003
  1038.         KEY @3 CALL @004
  1039.         KEY (ESC) QUIT
  1040.         /.
  1041.           Select one:  ^K First field    ^K Second field   ^K Third field
  1042.           or (ESC) to quit
  1043.         ./
  1044.         - @002 First field
  1045.         ECHO ^P10,1^C1Made it to ^C4first^C1 field's choice
  1046.         ECHO Press a key
  1047.         PAUSE
  1048.         POP                  /* Returns to first field by default
  1049.         - @003 Second field
  1050.         ECHO ^P10,1^C2Made it to ^C4second^C2 field's choice
  1051.         ECHO Press a key
  1052.         PAUSE
  1053.         POP KEY2             /* Will return user to the "Second field" field
  1054.         - @004 Third field
  1055.         ECHO ^P10,1^C3Made it to ^C4third^C3 field's choice
  1056.         ECHO Press a key
  1057.         PAUSE
  1058.         POP KEY3             /* Will return user to the "Third field" field
  1059.  
  1060. Unlike with GOTO and CALL, you cannot pass an environmental variable (like
  1061. KEY^EFIELD^) into a POP command.
  1062.  
  1063. Doing a POP from the TOP level is the same thing as QUIT.
  1064.  
  1065. Note that a POP statement on its own (outside a KEY statement) will result in
  1066. the current screen being closed and must be followed by a new page declaration
  1067. or else the end of the file.
  1068. DEMOSYS.REF                   Last revised 01/15/93                     Page 24
  1069.  
  1070. *******************
  1071.  
  1072. PROMPT ^Evar^ pattern string
  1073.  
  1074. The PROMPT command allows you to ask the user for a response.  This response is
  1075. put into an environmental variable which can then be displayed, written to a
  1076. file, etc.  The prompt itself appears on the primary screen.
  1077.  
  1078. The PROMPT command consists of three parts:
  1079.   * The environmental variable to use
  1080.   * The pattern that the input must adhere to
  1081.   * The prompt that the user sees and responds to
  1082.  
  1083. The pattern may consist of any of the following special patterns:
  1084.  
  1085.         FILESPEC        Any valid DOS file specification.  Note that DOS
  1086.                         considers "ABASDBASBDBASBD" to be a valid DOS file
  1087.                         specification and just truncates it to "ABASDBAS.BDB".
  1088.         VFILESPEC       Any valid DOS file specification for a file that
  1089.                         already exists.  "ABASDBASBDBASBD" will still be
  1090.                         accepted but the resulting "ABASDBAS.BDB" file had
  1091.                         better exist.
  1092.         MM/DD/YY        A valid date.
  1093.         PATH            A valid DOS path.  There's no slash at the end of
  1094.                         the path.
  1095.         VPATH           A valid DOS path that already exists.  There's no
  1096.                         slash at the end of the path.
  1097.  
  1098. The pattern may also consist of any series of the following characters:
  1099.  
  1100.         A               alpha input (A-Z) (either upper or lower case)
  1101.         B               Boolean input (T/F/Y/N; translated to Y/N on output)
  1102.         N               numeric input (digits 0 to 9 only)
  1103.         U               uppercase alpha (A-Z) only (translated to uppercase
  1104.                         if provided in lowercase)
  1105.         X               any character (decimal 32 to 125) (no translation)
  1106.         !               uppercase any character (decimal 32 to 125) (translated
  1107.                         to uppercase if provided in lowercase)
  1108.         else            any other characters in the pattern are left in the
  1109.                         result verbatim; spaces are not allowed
  1110.  
  1111. DEMOSYS.REF                   Last revised 01/15/93                     Page 25
  1112.  
  1113. Note that the pattern defines the maximum length of the user's input, not the
  1114. minimum.  A pattern of "AAAAA" may be filled in with "HI" and be accepted.
  1115.  
  1116. The prompt is a one-line input.  It can include control codes for position,
  1117. color, etc.  Control codes can also be used to make it print on multiple lines.
  1118. Note that the user's input will appear in the same color as the prompt unless
  1119. you include a color specification at the end of the prompt.
  1120.  
  1121. It's possible to create a prompt that will generate a fatal non-recoverable
  1122. error from The DEMO System.  Make sure that the prompt and the maximum size of
  1123. the input field fit within the screen limits.
  1124.  
  1125. If the environmental variable that you're prompting for already has a value,
  1126. then that value will show up as the default when the prompt is given.  You can
  1127. reset this by using the command "ASSIGN ^Evar^".
  1128.  
  1129. Examples:
  1130.  
  1131.         PROMPT ^EX^ MM/DD/YY ^C2What is the date of this report? ^C1
  1132.         PROMPT ^EY^ NNN-NN-NNNN ^C3Enter your social security number:
  1133.         PROMPT ^EZ^ B Is this correct? ^C2
  1134.  
  1135. *******************
  1136.  
  1137. PROMPTA ^Evar^ pattern string
  1138.  
  1139. Identical to the PROMPT command except the prompt occurs on the alternate
  1140. screen.
  1141.  
  1142. DEMOSYS.REF                   Last revised 01/15/93                     Page 26
  1143.  
  1144. *******************
  1145.  
  1146. QUIT [ return_code ]
  1147.  
  1148. The command causes the program to stop and return to DOS.  Every control card
  1149. file should consist of at least one QUIT statement and, by default, (C-C) is
  1150. always defined to do this.
  1151.  
  1152. The use of the return code (which can be an environmental variable) allows you
  1153. to use The DEMO System in sophisticated ways within a batch file.  For example,
  1154. let's say you have a menu system set up where some options will jump to DOS and
  1155. run a batch command and return to The DEMO System, while other options will not
  1156. return.  You could set up some options in The DEMO System to set the return code
  1157. as 1 (run an application defined in the batch file DOIT.BAT and then come back),
  1158. 2 (run DOIT.BAT but don't come back), and 3 (normal end; person wanted out of
  1159. the system).  If The DEMO System blows up (e.g.  you request a prompt that can't
  1160. possibly fit in the space allocated), The DEMO System itself will return an
  1161. errorlevel of 0.  Unfortunately, this is how it works in QuickBASIC and I can't
  1162. change that.  So the complete batch file might look like this:
  1163.  
  1164.         :Restart
  1165.         MYDEMO           (or whatever you call your demonstration program)
  1166.         IF ERRORLEVEL 3 GOTO :Goodbye
  1167.         IF ERRORLEVEL 2 GOTO :NoReturn
  1168.         IF ERRORLEVEL 1 GOTO :Return
  1169.         ECHO Fatal error in The DEMO System
  1170.         ECHO Check your control cards!
  1171.         GOTO :Done
  1172.         :Return
  1173.         CALL DOIT.BAT
  1174.         GOTO :Restart
  1175.         :NoReturn
  1176.         DOIT.BAT         (since CALL not used, will execute the batch file
  1177.                           and then stop; no need for a GOTO afterward)
  1178.         :Goodbye
  1179.         ECHO All done!
  1180.         :Done
  1181.  
  1182. Having said all this, creating files and then testing for them with an IF EXIST
  1183. statement in your DOS batch file is probably easier.
  1184.  
  1185. If you loaded any VGA text definitions (using the LOADLOGO command), you may
  1186. want to issue a LOADLOGO CLEAR command before quitting.
  1187.  
  1188. Upon exit, QUIT leaves the cursor wherever it was last placed.  You may want to
  1189. issue a LOCATE command (or an ECHO command with ^Prow,col specification) before
  1190. exiting.  This is typically done by adding a statement like this before QUIT:
  1191.  
  1192.         ECHO ^P23,1^C1Thank you for your interest in our product!
  1193.  
  1194. Note that a QUIT statement on its own (outside a KEY statement) will result in
  1195. the current screen being closed and must be followed by a new page declaration
  1196. or else the end of the file.
  1197. DEMOSYS.REF                   Last revised 01/15/93                     Page 27
  1198.  
  1199. *******************
  1200.  
  1201. RD directory
  1202.  
  1203. Removes a subdirectory.  If that directory does not exist or it cannot be
  1204. removed, an error message will be displayed but the program will continue on.
  1205.  
  1206. The directory can be an environmental variable.  It can contain drive
  1207. information if desired.
  1208.  
  1209. See also the CD, CDD, DRIVE, and MD commands.
  1210.  
  1211. *******************
  1212.  
  1213. REDRAW
  1214.  
  1215. Redraws the current text screen without branching.  Redrawing is frequently
  1216. necessary if you want to recover from the output of a RUN command.  The
  1217. branching consideration means that, unlike with SCREEN 0 (another way to
  1218. accomplish the screen redrawing desire), control will continue with the
  1219. statement after REDRAW, instead of re-starting at the first statement of the
  1220. screen.
  1221.  
  1222. Note that REDRAW affects only screens with attached text screens.  It doesn't do
  1223. much good for label pages.
  1224.  
  1225. An example:
  1226.  
  1227.         - *002 Sample
  1228.         KEY A GOTO *003
  1229.         KEY (ESC) QUIT
  1230.         /.
  1231.           Press A or (ESC)
  1232.         ./
  1233.         - *003
  1234.         ECHO Testing and press ENTER
  1235.         PAUSE
  1236.         REDRAW      /* This redraws the screen text (the two lines
  1237.                     /* in the /.  ...  ./ section below)
  1238.         RUN DIR *.EXE /W
  1239.         ECHO Press ENTER
  1240.         PAUSE
  1241.         REDRAW
  1242.         RUNA DIR *.BAS /W   /* Doing output to the alternate page
  1243.         ECHOA Press ENTER
  1244.         PAUSEA
  1245.         ECHO Press ENTER again
  1246.         PAUSE
  1247.         /.
  1248.  
  1249.                 This is some additional text that keeps coming
  1250.                 up when REDRAW is used but the other stuff doesn't
  1251.         ./
  1252.  
  1253.         POP             /* Remember, this has to be *after* the /. ... ./
  1254. DEMOSYS.REF                   Last revised 01/15/93                     Page 28
  1255.  
  1256. *******************
  1257.  
  1258. RUN [ string ]
  1259.  
  1260. Shells to DOS and executes a command (given by "string") in the primary screen.
  1261.  
  1262. If the command is not specified, you will be shelled to DOS and left at the DOS
  1263. prompt.  Say "EXIT" and press ENTER to return to The DEMO System.
  1264.  
  1265. The string can be a regular DOS command, any command that's available in your
  1266. path, a command with drive and path information if necessary, or the name of a
  1267. batch file.  The latter is used if you want to execute multiple commands at
  1268. once.
  1269.  
  1270. RUN leaves a copy of The DEMO System in memory and requires loading COMMAND.COM.
  1271. Together, these take up roughly 100K of RAM space.  If the remaining space is
  1272. not sufficient to run your application, consider using The DEMO System as part
  1273. of a batch file, quiting entirely to DOS, running your application, and then
  1274. reloading The DEMO System.  Techniques for doing this are discussed in
  1275. DEMOSYS.DOC under the "Creating menuing systems" section.
  1276.  
  1277. Typically, after running the command, your display screen will be messed up.
  1278. You may want to use any command that will redraw the current screen (REDRAW or
  1279. CLS) or else branch you to another screen (SCREEN, GOTO, CALL, POP) immediately
  1280. after doing a CALL command.
  1281.  
  1282. The command string can include environmental variables if desired.
  1283.  
  1284. You can also add a ">NUL:" at the end of the command string in order to try to
  1285. eliminate the screen output from the RUN command.  This doesn't always work.
  1286. See also the RUNA command.
  1287.  
  1288. DEMOSYS.REF                   Last revised 01/15/93                     Page 29
  1289.  
  1290. *******************
  1291.  
  1292. RUNA [ string ]
  1293.  
  1294. Similar to the RUN command except the commands are executed in the alternate
  1295. screen (instead of the primary screen) and the alternate screen is also made the
  1296. default screen for viewing the results.  This provides a way of running a batch
  1297. or DOS command without interfering with existing menus.
  1298.  
  1299. Some applications will change the default screen and wipe out your primary
  1300. screen anyway.  This is typically not the case with any internal DOS commands
  1301. but it may be a factor with others.  In these cases, you might as well use RUN
  1302. instead.
  1303.  
  1304. The command string can include environmental variables if desired.
  1305.  
  1306. *******************
  1307.  
  1308. SAVE filename
  1309.  
  1310. Saves the current screen to a file.  This is desirable in some cases (maybe the
  1311. current screen has an application form and you want the user to be able to print
  1312. or save it).
  1313.  
  1314. "Filename" can by any file (including drive and path information if desired) or
  1315. be any of the following DOS devices:
  1316.  
  1317.         KYBD:
  1318.         SCRN:
  1319.         COM1: to COM4:
  1320.         LPT1: to LPT2:
  1321.         CONS:
  1322.  
  1323. The filename can be an environmental variable if desired.
  1324.  
  1325. DEMOSYS.REF                   Last revised 01/15/93                     Page 30
  1326.  
  1327. *******************
  1328.  
  1329. SCREEN [ TOP | FIRST | -999 to 999 | BOTTOM | LAST ]
  1330.  
  1331. Branches the program to another screen or page using an implied GOTO command.
  1332. This is very useful for multi-page screens as it avoids the need to code the
  1333. name of the screen:
  1334.  
  1335.         - EXPLAIN.001 First screen
  1336.         KEY (PGDN) SCREEN 1
  1337.         KEY (ESC) QUIT
  1338.         - (GLOBAL)
  1339.         KEY (PGDN) SCREEN 1
  1340.         KEY (PGUP) SCREEN -1
  1341.         KEY (ESC) QUIT
  1342.         - EXPLAIN.002 Second screen
  1343.         - EXPLAIN.003 Third screen
  1344.         - EXPLAIN.004 Fourth screen
  1345.         - (GLOBAL)
  1346.         - EXPLAIN.005 Last screen
  1347.         KEY (PGUP) SCREEN -1
  1348.         KEY (ESC) QUIT
  1349.  
  1350. You can specify screen locations in relative terms using positive numbers to
  1351. move to the next screens in sequence and negative numbers to move to the prior
  1352. screen.  Note that the program does not distinguish text screens from label
  1353. screens when it's doing this movement; if you want to avoid a label, make sure
  1354. the label is not in the sequence you want to pass through.
  1355.  
  1356. You can also specify SCREEN TOP (or SCREEN FIRST) and SCREEN BOTTOM (or SCREEN
  1357. LAST) to take the user to the absolute first screen (*not* the one defined by
  1358. SET TOP; use "POP TOP" to do this) or the absolute last screen.  If you need to
  1359. hard-code the screen name, use GOTO instead.
  1360.  
  1361. Unlike the GOTO statement, SCREEN does not allow you to pass parameters
  1362. (including KEYn or CLEAR).  You will need to use GOTO if you want these things.
  1363.  
  1364. Note that a SCREEN statement on its own (outside a KEY statement) will result in
  1365. the current screen being closed and must be followed by a new page declaration
  1366. or else the end of the file.
  1367.  
  1368. DEMOSYS.REF                   Last revised 01/15/93                     Page 31
  1369.  
  1370. *******************
  1371.  
  1372. WRITE filename string
  1373.  
  1374. Writes a line of text to a file.  This is very useful for creating batch files
  1375. from your program.  It's also a good way of writing usage information or
  1376. anything else you want.  The file is appended to (your text is written to the
  1377. end of it).  If you want the file emptied before you write to it, use a DELETE
  1378. command.
  1379.  
  1380. "Filename" can by any file (including drive and path information if desired) or
  1381. be any of the following DOS devices:
  1382.  
  1383.         KYBD:
  1384.         SCRN:
  1385.         COM1: to COM4:
  1386.         LPT1: to LPT2:
  1387.         CONS:
  1388.  
  1389. The filename and the string can be an environmental variable if desired.
  1390.  
  1391. DEMOSYS.REF                   Last revised 01/15/93                     Page 32
  1392.  
  1393. --------------------------------------------------------------------------------
  1394.  
  1395.                                  KEY statement
  1396.  
  1397. KEY key[,key]... action_command [ parms ]
  1398.  
  1399. where:
  1400.  
  1401. "key" can consist of any of the following:
  1402.  
  1403.         regular keys         (BS)         (LPAREN)
  1404.         (special keys)       (DEL)        (PGDN)
  1405.         (MOUSER)             (DOWN)       (PGUP)
  1406.         (MOUSEL)             (END)        (RIGHT)
  1407.         (MOUSEB)             (ENTER)      (RPAREN)
  1408.         (ELSE)               (EQUAL)      (SPACE)
  1409.         (ANY)                (ESC)        (TAB)
  1410.         (A-key)              (HOME)       (UP)
  1411.         (C-key)              (INS)        @key
  1412.         (S-key)              (LEFT)       (ALT-n)
  1413.         (LASTKEY) <-- in BUFFER only
  1414.  
  1415. If multiple keys are coded in one KEY statement, the keys must be separated by
  1416. only a comma, no spaces.
  1417.  
  1418. "action_command" are any of the action commands listed previously.
  1419.  
  1420. "parms" are in fact required for some action commands.
  1421.  
  1422.  
  1423. Four key assignments are made by default by The DEMO System.  If you do not want
  1424. these keys assigned as such, you have to specifically reassign the keys or use
  1425. the (ANY) key assignment.  You cannot use SET KEYS CLEAR or an non-specific
  1426. (GLOBAL) definition to clear them.
  1427.  
  1428.         SET (C-C) QUIT
  1429.         SET (C-F1) ECHO ^P25,65^EFNAME^@
  1430.         SET (C-J) RUN
  1431.         SET (C-R) REDRAW
  1432.  
  1433.  
  1434. DEMOSYS.REF                   Last revised 01/15/93                     Page 33
  1435.  
  1436. --------------------------------------------------------------------------------
  1437.  
  1438.                          Miscellaneous string concepts
  1439.  
  1440. Screens, displayed text (with a few exceptions), and some action commands can
  1441. have some special things imbedded in them.  Most of them accept environmental
  1442. variables (strings which can change in value).  A few also accept control codes
  1443. (which control cursor positions, coloring, and the rest).
  1444.  
  1445.         Action command  Can accept
  1446.  
  1447.         ASSIGN          Environmental variables
  1448.         CALL            Environmental variables (in the parameter list only)
  1449.         CD              Environmental variables
  1450.         CDD             Environmental variables
  1451.         COPY            Environmental variables
  1452.         DELETE          Environmental variables
  1453.         ECHO, ECHOA     Environmental variables and control statements
  1454.         GOTO            Environmental variables (in the parameter list only)
  1455.         LOCATE          Environmental variables
  1456.         MD              Environmental variables
  1457.         PROMPT, PROMPTA Environmental variables
  1458.                         Control statements in prompt only
  1459.         QUIT            Environmental variables
  1460.         RD              Environmental variables
  1461.         RUN, RUNA       Environmental variables
  1462.         SAVE            Environmental variables
  1463.         WRITE           Environmental variables
  1464.  
  1465.         Input screens   Environmental variables and control statements
  1466.  
  1467. The descriptions which follow are also presented in the DEMOSYS.DOC file.
  1468.  
  1469.  
  1470. DEMOSYS.REF                   Last revised 01/15/93                     Page 34
  1471.  
  1472. Environmental variables:
  1473.  
  1474. Most text strings (including input pages) can contain both real and
  1475. pseudo-environmental variables.  These can include any variable defined in your
  1476. DOS environment (such as PROMPT or PATH).  The pseudo-variable can also include
  1477. several variables within The DEMO System, passed variables, and user-defined
  1478. variables.  They also include variables that are defined in PROMPT statements
  1479. and some others.
  1480.  
  1481. All environmental variables appear as "^Evar^" (without the quotes).  The DOS
  1482. prompt, for example, is represented as "^EPROMPT^".  If this character string
  1483. appears as part of an output block (either a screen, or a logo, prompt, or ECHO
  1484. result), the variable will be expanded into the proper string.
  1485.  
  1486. (Some times, this will present problems.  Avoid putting an environmental
  1487. variable in a row that will not fit on the screen.  Results are uncertain in
  1488. these cases.)
  1489.  
  1490. The variables predefined by The DEMO System include those listed below.  Some of
  1491. them may not have an immediately useful value but future changes to The DEMO
  1492. System will make them relevant.
  1493.  
  1494.         ^EDATE^         the current system date (in mm/dd/yy format)
  1495.         ^ETIME^         the current system time (in hh:mm:ss format)
  1496.         ^EETIME^        the elapsed time that the user has used this program
  1497.                         (in hh:mm:ss format)
  1498.  
  1499.         ^EFNAME^        the name of the screen input file
  1500.         ^EFDESC^        the description (if any) of the screen input file
  1501.         ^EFPAGE^        the sequential number of the screen input file
  1502.  
  1503.         ^EDIR^          the current default directory for the default drive
  1504.                         (no slash appears at the end of the name)
  1505.         ^EINITDIR^      the initial default directory when the program was
  1506.                         loaded (no slash appears at the end of the name)
  1507.  
  1508.         ^EDISPLAY^      the current display type (COLOR or MONO)
  1509.         ^EDISPLAYN^     the current display type (1=COLOR, 2=MONO)
  1510.         ^EFIELD^        the current field number
  1511.         ^ECOL^          the current screen column number
  1512.         ^EROW^          the current screen row number
  1513.  
  1514. In addition, when using CALL and GOTO statements, you can pass one of more
  1515. variables.  These variables are assigned sequentially to the
  1516. pseudo-environmental variables ^E1^ to ^E9^.
  1517.  
  1518. Note that you can change regular DOS environmental variables (like PROMPT) but
  1519. they are redefined only until your program completes.  Once you go back to DOS,
  1520. they're reset to whatever they started off to be.
  1521.  
  1522. You can usually concatenate environmental variables with other variables and
  1523. character strings.  For example, the following usually works:
  1524.  
  1525.         KEY (PGDN) GOTO *006 KEY^EFIELD^
  1526. DEMOSYS.REF                   Last revised 01/15/93                     Page 35
  1527.  
  1528. ^ Control codes:
  1529.  
  1530. The screens themselves can include codes which establish colors, input
  1531. locations, and other things.  There are seven types of control codes that The
  1532. DEMO System accepts in text strings (including logos and cursor indicators) but
  1533. one of them (the "^Prow,col" indicator) should not be used within a screen.
  1534. These codes are as follows:
  1535.  
  1536.         ^Cn             /* Set the color to color (or monochrome) set "n"
  1537.         ^K              /* Establish this as a keyboard-input field
  1538.         ^Evar^          /* Print an environmental variable here
  1539.         ^Tn             /* Print "n" non-destructive spaces here
  1540.         ^Sn             /* Print "n" destructive spaces here (used only
  1541.                         /* to reduce the size of your input file; The DEMO
  1542.                         /* System automatically uses space compression when it
  1543.                         /* encounters five or more spaces together)
  1544.         ^Pr,c           /* Locate the cursor at row "r" and column "c":
  1545.                         /* this setting is not allowed within text screens
  1546.                         /* themselves and should only be used in SET CURSOR,
  1547.                         /* SET LOGO, ECHO, PROMPT, etc commands
  1548.         ^_              /* Ignored.  Typically used only if you want to
  1549.                         /* print out one of the other control key sequences
  1550.  
  1551. Any text that is not part of these control codes (including spaces) are treated
  1552. as text and is printed as is.
  1553.  
  1554.  
  1555. DEMOSYS.REF                   Last revised 01/15/93                     Page 36
  1556.  
  1557. --------------------------------------------------------------------------------
  1558.  
  1559.                           Primary vs alternate screen
  1560.  
  1561. There are two screens available within The DEMO System.  The primary screen is
  1562. the one that all text screens are shown on.  An alternate screen is available
  1563. when you want to have some action go on that doesn't interfere with your
  1564. original screens.
  1565.  
  1566. Almost all commands work only with primary screen.  Those which provide you the
  1567. option are as follows:
  1568.  
  1569.                              Command   Output goes to
  1570.  
  1571.                              ECHO      Primary
  1572.                              ECHOA     Alternate
  1573.                              PAUSE     Primary
  1574.                              PAUSEA    Alternate
  1575.                              RUN       Primary
  1576.                              RUNA      Alternate
  1577.  
  1578. In some cases, the command you run will not reflect your wishes as to which
  1579. screen it should use.
  1580.  
  1581.  
  1582. --------------------------------------------------------------------------------
  1583.  
  1584.                                 System maximums
  1585.  
  1586. Most of these maximums can be expanded fairly easily if necessary.  If this
  1587. becomes a problem, contact Wayne Software at the address specified at the top of
  1588. this document.
  1589.  
  1590.       Maximum number of pages: 1000
  1591.       Keys defined per screen: 255
  1592.       Keyboard input fields per screen: 90
  1593.       Maximum number of lines per screen: 25
  1594.       Maximum supported number of columns per screen: 80
  1595.       Maximum number of pages with imbedded text: 999
  1596.       Color sets: 8 (0 to 7)
  1597.       CALL return stack: last 20 calls
  1598.       Maximum number of environmental variables used in program: 20
  1599.  
  1600.